package com.elite;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * Hello world!
 *
 */
@SpringBootApplication
public class App
{
    public static void main( String[] args )
    {
        SpringApplication.run(App.class, args);
// 都说喜欢画心心，今天我也来画一个
        // 定义爱心的大小
        int size = 5;
        String heart = "";
        // 上半部分
        for (int i = size / 2; i < size; i++) {
            for (int j = 0; j < size; j++) {
                if ((j >= i - (size / 2)) && (j <= (size / 2) + i) && ((i == size / 2 && j > 0 && j < size - 1) || i != size / 2)) {
                    System.out.print(("* "));
                } else {
                    System.out.print("  ");
                }
            }
            System.out.println();
        }
        // 下半部分
        for (int i = size; i > 0; i--) {
            for (int j = 0; j < size; j++) {
                if ((j >= i - (size / 2)) && (j <= (size / 2) + i - (size / 2) * 2) && (i != size / 2 + 1 || j != size / 2)) {
                    System.out.print("* ");
                } else {
                    System.out.print("  ");
                }
            }
            System.out.println();
        }

    }
}
